package cl.whyem.appbase.services;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cl.whyem.appbase.entities.User;
import cl.whyem.appbase.dao.UserDAO;

/**
 * @author Siva
 *
 */
@Service
@Transactional
public class UserService {

    @Autowired
    private UserDAO userDAO;

    public List<User> findAllUsers() {
        return userDAO.findAllUsers();
    }
    
    /**
     * Traer los usuarios desde consulta en Mapper.xml
     */
    public List<User> traerTodosUsuarios() {
        return userDAO.traerTodos();
    }
}
